package sfeir.gwt.ergosoom.server.guice;

import com.google.inject.Key;

import org.restlet.resource.Finder;
import org.restlet.resource.ServerResource;

/**
 * Produces a Finder instance, given a Guice key or a Handler class, that
 * will obtain a Handler/Resource for that key or class.
 */
public interface FinderFactory {

    /**
     * Returns a Finder that will obtain an instance of Handler
     * bound to the given Key.
     */
    Finder finderFor(Key<? extends ServerResource> key);

    /**
     * Returns a Finder that will obtain an instance of Handler
     * bound to the given class.
     */
    Finder finderFor(Class<? extends ServerResource> cls);
}
